Tape drive, tape drive recording system, and method for selecting improved tape speed in response to intermittent read requests

ABSTRACT

A tape drive, tape drive recording system, and method are provided for improving tape speed selection during data transfer. The tape drive includes a buffer, a tape for recording the data to be temporarily stored in the buffer, and a read head. The tape drive further includes a reading controller that initially sets a tape speed such that a drive transfer rate matches a host transfer rate as closely as possible and that drives the tape at the tape speed. To address backhitching caused by one or more host transfer halts, the reading controller subsequently adjusts the tape speed such that the drive transfer rate is lower than the host transfer rate by recalculating the host transfer rate in consideration of the host transfer and the host transfer halt and setting the tape speed such that the drive transfer rate matches the recalculated host transfer rate as closely as possible.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation application of U.S. patentapplication Ser. No. 12/574,329, filed Oct. 6, 2009. The presentapplication claims priority under 35 U.S.C. §120 to U.S. patentapplication Ser. No. 12/574,329, which claims priority under 35 U.S.C.§119 to Japanese Patent Application No. 2008-264682, filed Oct. 10,2008, and to Japanese Patent Application No. 2008-281985, filed Oct. 31,2008, the contents of which are incorporated herein by reference.

TECHNICAL FIELD

The various embodiments described herein relate to a tape recordingapparatus (i.e., tape drive) for improving data transfer to a higherapparatus (e.g., host) in response to intermittent read requests. Thevarious embodiments further relate to a method for selecting an improvedtape speed for reading data.

BACKGROUND OF THE INVENTION

The various embodiments described herein are applicable to a sequentialdata recording apparatus, such as a tape drive based on the lineartape-open (LTO) standard or a large tape drive targeted for enterprises(e.g., IBM 3592).

During operation of such tape drive, to cut waste in storage capacity,it is necessary to minimize an interval between data elements written ona tape in the longitudinal direction. In addition, a subsequent dataelement needs to be read immediately after a previous data element isread from the tape. To carry out such sequential writing/reading, thetransport speed of the tape is reduced, the tape is temporarily stopped,and the tape is rewound in the reverse direction. Such rewinding movesthe head back to the appropriate place for writing/reading, and the headperforms motor-operated writing/reading with respect to the subsequentdata element. A series of motor-driven operations for rewinding the tapeis called a backhitch. A backhitch typically requires 2-3 seconds.

During a data read, a buffer of the tape drive may fill with data readfrom the tape when a data transfer rate from the tape to a buffer memoryinside the tape drive (i.e., drive transfer rate) is higher than a datatransfer rate from the buffer memory to a host (i.e., host transferrate). In such case, once the buffer runs out of space to storesubsequent data read from the tape, the tape drive must stop readingdata from the tape. Once the tape drive stops reading, backhitching isperformed to prepare for reading the subsequent data. Such backhitchingresults in overhead, thereby impeding data transfer to the host (i.e.,host transfer).

Japanese Unexamined Patent Application No. 2006-318571 describes atechnique for changing tape speed in accordance with a host transferrate to avoid an impact on the performance of data transfer caused by anegative effect of backhitching on motion of the tape. The data transferrate for writing/reading performed by the tape drive is uniquelydetermined by adjusting tape speed in accordance with the measured hosttransfer rate.

Specifically, during a data read, if the host transfer rate is lowerthan the drive transfer rate, data read from the tape accumulates in thebuffer inside the tape drive. When the buffer becomes full of data readfrom the tape, even if more data is read from the tape, the read datacannot be transferred to the buffer. At such time, the tape driveproduces a backhitch and begins moving the tape to the place immediatelyafter the lastly read data. During the backhitch, the host continues toread data, and the tape drive continues to send the data stored in thebuffer to the host. If the buffer becomes empty of data beforecompletion of the backhitch, the host waits for transmission ofsubsequent data to the buffer after completion of the backhitch. Thus,the time required by the backhitch has a significant negative impact onthe host transfer rate. Accordingly, the technique described in JapaneseUnexamined Patent Application No. 2006-318571 adjusts the tape speedsuch that the drive transfer rate matches the host transfer rate asclosely as possible. In accordance with this technique, the hosttransfer rate is measured inside the drive, and the tape speed isadjusted in response to such measurement. If the host continues to readdata at a constant speed, the host transfer rate can be readilymeasured. However, this technique does not adequately address a case inwhich the host transfer rate significantly changes. Since themeasurement varies depending on what point in time the host transferrate is measured, and since it is unclear how the host will read data inthe future, it is difficult to determine the best tape speed for a longtime frame.

Japanese Unexamined Patent Application Publication (Translation of PCTApplication) No. 2002-528835 describes a method for seamlessly changingthe tape speed in accordance with the status of the buffer or the hosttransfer rate in order to prevent buffer overrun and buffer underrun.The method reduces the frequency of backhitches when the host transferrate is constant or changes subtly. However, this method is notsubstantially beneficial if the host transfer rate significantly changesand/or a plurality of intermittent data transfers occur. Becausesynchronization of the host transfer rate and the drive transfer rate isalways intended, an adverse reaction resulting in a backhitch may occurwhen the host transfer rate significantly changes (e.g., when datatransfer to the host side temporarily halts).

Accordingly, with known techniques, overhead caused by occurrence of abackhitch cannot be reduced when the host transfer rate significantlychanges (e.g., as a result of a plurality of intermittent readrequests).

SUMMARY OF THE INVENTION

The various embodiments described herein provide a tape drive and a tapedrive recording system capable of selecting an improved tape speed atwhich the performance of transferring data to a host is not degraded. Inaddition, a method is provided for selecting an improved tape speed foruse therein. The tape drive, tape drive recording system, and methodreduce the negative effects of backhitching when intermittent hosttransfers occur.

In accordance with a first aspect of the various embodiments, a tapedrive is provided for transferring data to a host (i.e., performing ahost transfer) when the host issues a plurality of read requests. Thetape drive addresses situations in which a host transfer halt occurssubsequent to a host transfer. A host transfer halt is an intervalduring which data transfer temporarily stops. The tape drive comprises abuffer, a tape, a read head, and reading controller. The buffertemporarily stores data to be transferred to the host. The tape recordsthe data to be temporarily stored in the buffer. The read head readsdata recorded on the tape and sequentially stores the data in thebuffer. The reading controller initially sets a tape speed such that adrive transfer rate matches a host transfer rate as closely as possible.Moreover, the reading controller drives the tape at the tape speed.Furthermore, the reading controller measures an amount of data stored inthe buffer during a host transfer halt subsequent to a host transfer anddetermines whether the buffer is full of data. If the reading controllerdetermines that the buffer is full of data, the reading controlleradjusts the tape speed such that the drive transfer rate is lower thanthe host transfer rate. Additionally, the reading controller may invokebackhitching when the buffer becomes full of data.

In accordance with an exemplary embodiment, the reading controller mayadjust the tape speed such that the drive transfer rate is lower thanthe host transfer rate by recalculating the host transfer rate inconsideration of the host transfer and the host transfer halt and thensetting the tape speed such that the drive transfer rate matches therecalculated host transfer rate as closely as possible. The readingcontroller may recalculate the host transfer rate on the basis ofmeasured backhitching attributes resulting from the host transfer halt.More specifically, the reading controller may measure a time intervalbetween beginning points of a first backhitch and a second backhitch andmay measure an amount of data transferred during such time interval.Then, the reading controller may recalculate the host transfer rate onthe basis of the time interval and an amount of data transferred duringthe time interval.

In accordance with a second aspect of the various embodiments, a tapedrive recording system may be provided comprising a host and theabove-described tape drive. The tape drive is connected to the host andtransfers data to the host.

In accordance with a third aspect of the various embodiments, a methodis provided for selecting a tape speed for transferring data from a tapedrive to a host when the host issues a plurality of read requestscontaining a host transfer halt. The above-described tape drive may beused in conjunction with the method. The method may comprise initiallysetting the tape speed such that the drive transfer rate matches thehost transfer rate as closely as possible, driving a tape at the tapespeed, measuring an amount of data stored in the buffer during a hosttransfer halt subsequent to a host transfer, determining whether abuffer of the tape drive is full of data, and adjusting the tape speedsuch that the drive transfer rate is lower than the host transfer rateif the buffer is full of data. In addition, the method may compriseinvoking backhitching when the buffer becomes full of data.

In accordance with an exemplary embodiment, the adjusting step of themethod may comprise recalculating the host transfer rate inconsideration of the host transfer and the host transfer halt and mayfurther comprise setting the tape speed such that the drive transferrate matches the recalculated host transfer rate as closely as possible.The recalculating step may comprise measuring backhitching attributesresulting from the host transfer halt. The measured backhitchingattributes may include a time interval between beginning points of afirst backhitch and a second backhitch and an amount of data transferredduring the time interval.

In accordance with the various embodiments, a tape speed that is bettermaintained and that reduces adverse effects caused by backhitching maybe determined in response to intermittent read requests from a host. Inaddition, monitoring the amount of data that has not yet beentransferred to the host inside a buffer can prevent the tape speed frombeing unduly modified as a result of a temporary increase in the hosttransfer rate or a host transfer halt.

BRIEF DESCRIPTION OF THE DRAWINGS

The various embodiments described herein will be described in detailwith reference to the following figures.

FIG. 1 illustrates a tape drive recording system that may be used inconjunction with an exemplary embodiment.

FIG. 2 illustrates a process in which after a tape drive receives from ahost a request to read data, the tape drive reads the data from a tapeand sends the data to the host through a buffer and an interface.

FIG. 3 illustrates the amount of data transferred to a host from a tapedrive and the amount of data transferred to the tape drive from a tapeat various rates in a scenario in which the tape drive receives from thehost a plurality of requests to read a series of data elements.

FIG. 4 illustrates the backhitching and accompanying overhead thatresult when a tape drive sets the tape speed in accordance with a knowntechnique.

FIG. 5 illustrates in further detail the backhitching and accompanyingoverhead that result when a tape drive sets the tape speed in accordancewith a known technique and also illustrates how backhitching attributesare measured for the purpose of setting the tape speed in accordancewith an exemplary embodiment.

FIG. 6 illustrates the benefits of using a technique in accordance withan exemplary embodiment such that the drive transfer rate matches therecalculated host transfer rate as closely as possible.

DETAILED DESCRIPTION

Exemplary embodiments addressing cases in which a plurality of readrequests (e.g., read commands) with intervals containing host transferhalts are issued from a host to a tape drive will be described below.

An improved technique for setting a tape speed according to an aspect ofthe various embodiments described herein enables selection of animproved tape speed with respect to not only a host transfer rate butalso an interval between backhitches occurring when a buffer becomesfull. Three major characteristics of the improved technique are asfollows:

1. The host transfer rate not only may be measured but also may berecalculated in consideration of the duration of a host transfer halt.The host transfer rate may be recalculated from an interval between thebeginning points of backhitches occurring when the buffer becomes full(e.g., duration of a host transfer halt, overhead time). Subsequently,an improved tape speed may be selected such that the drive transfer ratematches the recalculated host transfer rate as closely as possible.

2. Since the various embodiments explicitly take into account a hosttransfer halt occurring between host transfers, the various embodimentsmay refrain from selecting a faster tape speed, even when the hosttransfer rate is significantly higher than the drive transfer rate, ifselecting a faster tape speed would adversely affect performance for thelong term.

3. The tape speed may be increased when the host transfer rate issignificantly increased with respect to the drive transfer rate ofreading data from the tape for the long term. Such case occurs whenlarge data elements are continuously transferred to the host without ahost transfer halt or when there is a relatively short host transferhalt between transfers. In either case, the tape speed is set such thatthe drive transfer rate matches the host transfer rate as closely aspossible, as is the case with known techniques.

A method for deriving a recalculated host transfer rate H* on the basisof a host transfer rate H and a duration of time including a hosttransfer halt is described herein in accordance with an exemplaryembodiment. In an actual environment, the host transfer rate oftensignificantly varies, and intermittent data transfers often occur. Inone example case, a host transfer of 320 MB of data is performed. Insuch case, the host transfer rate during which data is read consistentlyat 160 MB/sec measures 160 MB/sec (derived from 320 MB/(320 MB/[160MB/sec])). However, when a 1-second host transfer halt is factored intothe calculation, the host transfer rate becomes approximately 106 MB/sec(derived from 320 MB/([320 MB/[160 MB/sec]]+1 sec)). The use of 160MB/sec as the reference host transfer rate for determining tape speed,and not 106 MB/sec, results in the buffer becoming full, and thus abackhitch results. On the other hand, if the duration of a host transferhalt is factored into the calculation such that the recalculated hosttransfer rate of 106 MB/sec is used as the reference host transfer rate,backhitching may be reduced, since the relatively lower recalculatedhost transfer rate may reduce the frequency of buffer fills.Accordingly, selecting the tape speed such that the drive transfer ratematches the recalculated host transfer rate as closely as possible canreduce negative effects of backhitching on the performance of hosttransfer for the long term.

FIG. 1 illustrates an example of a tape drive recording system that maybe used in conjunction with an exemplary embodiment. The tape driverecording system comprises a tape drive 10 and a host 30 connectedthereto. The tape drive 10 writes a plurality of data elements (e.g.,user data elements) transmitted from the host 30 on a tape 23 and readsthem therefrom in fixed-length data set units. The tape 23 has afixed-length format structure. A data set is a collection of dataelements recorded on the tape 23.

The tape drive 10 comprises a buffer 12, a read/write channel 13, a head14, a motor 15, and reels 21 and 22 around which the tape 23 is wound.The tape drive 10 further comprises a reading controller 16, ahead-position control system 17, and a motor driver 18. The motor 15 maycomprise two motors. The tape drive 10 further comprises a detachabletape cartridge 20 mounted therein.

The tape cartridge 20 comprises the tape 23 wound around the reel 21.The tape 23 moves longitudinally in the direction from the reel 21 tothe reel 22 or from the reel 22 to the reel 21 together with therotation of the reels 21 and 22. The tape 23 may be magnetic or ofanother type. The head 14 is used to write information on the tape 23 orto read information from the tape 23 while the tape 23 moveslongitudinally. The motor 15 rotates the reels 21 and 22.

The reading controller 16 controls the overall tape drive 10. Thereading controller 16 controls writing data on the tape 23 or readingdata from the tape 23 in accordance with a command received from thehost 30. The reading controller 16 further controls the head-positioncontrol system 17 and the motor driver 18 such that backhitching may beperformed. Data received through the read/write channel 13 is written onor read from the tape 23 by the head 14. According to another exemplaryembodiment, the tape drive 10 may comprise a write head 14 a for writingdata and a read head 14 b for reading data.

The small computer system interface (SCSI) standards may be used as acommunication standard for the interface between the tape drive 10 andthe host 30. When SCSI are used, the host 30 issues a Write command forwriting data to the tape drive 10, a Read command for reading data fromthe tape drive 10, and a Locate or Space command for specifying thelocation of a variable-length data element to the tape drive 10.

The buffer 12 comprises memory for storing data to be written on thetape 23 or data read from the tape 23. The buffer 12 may comprisedynamic random access memory (DRAM), for example. The buffer 12comprises a plurality of fixed-length segments, and each of theplurality of segments stores a data set read from the tape 23 or to bewritten to the tape 23. One data set comprises a plurality of dataelements transmitted from or to be transmitted to the host 30.

FIG. 2 illustrates a process in which after the tape drive 10 receives arequest to read data from the host 30, the tape drive 10 reads the datafrom the tape 23 and sends the data to the host 30 through the buffer 12and a host interface 11. The host 30 can receive data at the maximumhost transfer rate H, which is assumed to be 160 MB/sec herein. Thereading controller 16 of the tape drive 10 can transmit data from thetape 23 to the buffer 12 at the drive transfer rate M, which for examplemay be 40 MB/sec, 80 MB/sec, 120 MB/sec, or 160 MB/sec. The hosttransfer rate H is determined by measuring the amount of datatransferred from the buffer 12 to the host 30 per unit time. The drivetransfer rate M is uniquely defined by the tape speed and the recordingdensity of the tape.

When the host transfer rate H from the buffer 12 to the host 30 is lowerthan the drive transfer rate M from the tape 23 to the buffer 12,backhitching occurs in the tape drive 10. When the buffer 12 is full ofstored data read from the tape 23, the buffer 12 cannot store additionaldata. To sequentially read data from the tape 23, it is necessary toread data out of the buffer 12 and to transfer the data to the host 30such that free space becomes available in the buffer 12. To this end,positioning the head 14 at the tape location immediately after data readfrom the tape 23 is required, and such positioning requires a certaintime (e.g., 2-3 seconds) for backhitching.

FIG. 3 illustrates the amount of data transferred to the host 30 fromthe tape drive 10 and the amount of data transferred to the buffer 12 oftape drive 10 from the tape 23 at various rates in a scenario in whichthe tape drive 10 receives from the host 30 a plurality of requests toread a series of data elements (A, B, C, . . . ). As shown in FIG. 3,the host 30 has issued a plurality of read requests to the tape drive 10with host transfer halts inserted therebetween.

If the host transfer rate H is measured only when an initial hosttransfer (Read[A]) is performed, a drive transfer rate MA is selected soas to match the host transfer rate H as closely as possible at thattime. Subsequently, when the transfer to the host temporarily stopsduring a host transfer halt, the difference between the amount of dataread from the tape 23 at the drive transfer rate MA and the amount ofdata transferred from the tape drive 10 to the host 30 exceeds thebuffer size X. When the amount of stored data reaches the buffer size X,a backhitch occurs.

On the other hand, if a lower drive transfer rate MB is used during theinitial host transfer (Read[A]), the amount of data being stored in thebuffer 12 during the host transfer halt does not reach the buffer sizeX. Thus, no backhitch is necessary, and the buffer 12 is immediatelyavailable for a host transfer (Read[B]) subsequent to the host transferhalt. Accordingly, the drive transfer rate MB can provide better resultsthan the drive transfer rate MA.

FIG. 4 illustrates a scenario in which overhead resulting frombackhitching occurs when the tape drive 10 sets the tape speed inaccordance with a known technique and receives a plurality of readrequests from the host 30. During backhitching, it is possible tocontinue transferring data already present in the buffer 12 to the host30. However, while the data already present in the buffer 12 can betransferred to the host 30, subsequent data cannot be transferred to thehost 30 until backhitching is completed, since backhitching impedes datatransfer from the tape 23 to the buffer 12. Thus, backhitching canresult in a period of overhead in which data cannot be transferred tothe host 30. As a result of such overhead, the overall host transferrate H is adversely affected.

FIG. 5 illustrates in further detail the backhitching and accompanyingoverhead that result when the tape drive 10 sets the tape speed inaccordance with a known technique such that the drive transfer rate Mmatches the host transfer rate H as closely as possible at a specificpoint. In addition, FIG. 5 illustrates how backhitching attributes aremeasured for the purpose of setting the tape speed in accordance with anexemplary embodiment. In accordance with an exemplary embodiment, inresponse to a plurality of read requests from the host containing hosttransfer halts, the host transfer rate H may be replaced with arecalculated host transfer rate H* for purposes of setting the tapespeed. As further described herein, the recalculated host transfer rateH* may be derived on the basis of measured backhitching attributesresulting from the initial use of the host transfer rate H.

Typically, an application of the host 30 sequentially reads a pluralityof individual data elements from the tape drive and processes them on anelement-by-element basis. As described above, requests (Read[A],Read[B], Read[C], Read[D], Read[E], . . . ) to intermittently read aseries of data elements (A, B, C, . . . ) are issued. If the tape speedcorrelates with the host transfer rate H for the initial data element(A) in accordance with a known technique, overhead resulting frombackhitching occurs subsequent to a host transfer halt. Morespecifically, overhead resulting from backhitching may occur if the tapespeed is set on the basis of an excessively high host transfer rate H inaccordance with a known technique. Similarly, overhead resulting frombackhitching may occur if the drive transfer rate M is selected withouttaking into account a series of subsequent host transfer halts inaccordance with a known technique.

In accordance with an exemplary embodiment, such overhead may be avoidedby recalculating the host transfer rate H on the basis of a timeinterval Ty (t#m+1−t#m) between the beginning points of two sequentialbackhitches occurring as a result of using a known technique, asprovided in FIG. 5. The recalculated host transfer rate H* is utilizedto adjust the drive transfer rate M for use in a subsequent hosttransfer. When the tape speed is selected such that the drive transferrate M matches the recalculated host transfer rate H* as closely aspossible, overhead resulting from occurrence of backhitching can beprevented in the event of a host transfer halt. In general, therecalculated host transfer rate H* used in accordance with an exemplaryembodiment will be lower than the host transfer rate H used in each hosttransfer for the series of data elements (A, B, C, . . . ) in accordancewith a known technique.

FIG. 6 illustrates the benefits of using a technique in accordance withan exemplary embodiment such that the drive transfer rate M matches therecalculated host transfer rate H* as closely as possible. In the casein which one or more host transfer halts are present between readrequests, backhitching and accompanying overhead can be reduced when thetape speed is selected by use of a recalculated host transfer rate H*that is lower than an apparent host transfer rate H in accordance withthe exemplary embodiment.

Implementation of the reading controller 16 of the tape drive 10 willnow be described in accordance with an exemplary embodiment. Theprocedure for selecting the drive transfer rate M according to suchimplementation is described with reference to FIGS. 5 and 6. Accordingto an exemplary embodiment, a method is provided for determining therecalculated host transfer rate H* based on a time interval between thebeginning points of backhitches occurring as a result of using a knowntechnique. For purposes of the following description, X, B, H, and M aredefined as follows:

-   -   Buffer size: X [MB]    -   Buffer storage rate: Rate at which data is stored in the buffer:        B [MB/sec]    -   Host transfer rate: Transfer rate at which data is transferred        from the tape drive to the host: H [MB/sec]    -   Drive transfer rate: Transfer rate at which data is read from        the tape by the tape drive: M [MB/sec]

To effectively process a read request from the host, the tape speed maybe selected such that the drive transfer rate M satisfies M>H. If M>H,data is available in the buffer 12, and thus a host transfer need notwait for a drive transfer. However, in accordance with a knowntechnique, the drive transfer rate M may be only slightly higher thanthe host transfer rate H to enhance synchronization between a hosttransfer and a drive transfer. More specifically, to avoid a backhitch,the tape speed is provided such that the drive transfer rate M matchesthe host transfer rate H as closely as possible (i.e., M≈H). The bufferstorage rate B is calculated by B=M−H. Accordingly, in theory, the timeTx up to when the buffer becomes full is obtained by Tx=X/B.

FIG. 5 shows that when the drive transfer rate M is determined inaccordance with a known method, a backhitch occurs at the time t#m, anda subsequent backhitch occurs at the time t#m+1. The host transfer rateH and the drive transfer rate M measured by the drive at the time t#mand at the time t#m+1 are defined as follows:

-   -   The host transfer rate measured at the time t#m is H#m [MB], and        the drive transfer rate measured at the time t#m is M#m [MB].    -   The host transfer rate measured at the time t#m+1 is H#m+1 [MB],        and the drive transfer rate measured at the time t#m+1 is M#m+1        [MB].

The time interval Ty=t#m+1−t#m [sec] from the beginning point of a firstbackhitch to the beginning point of a second backhitch and the amount ofread data D [MB] read from the tape in the time interval Ty areobtained. For example, in FIG. 5, 100 data sets (DS) are provided as theamount of read data D.

If H#m measured at the time t#m leads to selection of a tape speedsatisfying H#m<M#m, then the theoretical time interval Tx betweenbackhitches is Tx=X/(M#m−H#m). If the actually measured time interval Tybetween backhitches is smaller than the theoretical time interval Tx,then it is clear that the host transfer rate H#m referred to inselecting the drive transfer rate M#m at the time t#m is higher than itshould be. In accordance with an exemplary embodiment, overhead can bereduced by using the recalculated host transfer rate H* (H*=D/Ty). Asillustrated in FIG. 6, the recalculated host transfer rate H* may takeinto account the duration of a host transfer halt and overhead time.Since use of the recalculated host transfer rate H* can reducebackhitches in terms of long-term host transfer, degradation in hosttransfer performance can be avoided.

The technical significance of Ty<Tx as mentioned above is describedbelow in the context of backhitch occurrence and tape speed selection.The theoretical backhitch time interval Tx is determined by Tx=X/(M−H).To smoothly process a reading request from the host, the drive transferrate M should be somewhat higher than the host transfer rate H. However,to prevent a backhitch caused by the buffer becoming full of data, inaccordance with a known technique the drive transfer rate M is selectedsuch that M≈H. Accordingly, the theoretical time interval Tx betweenbackhitches is long. In other words, theoretically, M is approximatelyequal to H to prevent occurrence of a backhitch. An estimation of Ty<Txfor the time interval Ty between the actual adjacent backhitch revealsthat the subsequent backhitch occurs earlier than theorized.Accordingly, the drive transfer rate M selected by the readingcontroller in accordance with a known technique is based on the hosttransfer rate H being higher than it actually should be. The hosttransfer rates H#m and H#m+1 at specific points t#m and t#m+1respectively are determined without considering the duration of a hosttransfer halt and overhead time resulting from a backhitch.

The various embodiments described herein take into account Ty<Tx. Thatis to say, in accordance with an exemplary embodiment, the recalculatedhost transfer rate H* may be determined on the basis of the time Ty, andthe recalculated host transfer rate H* may take into account theduration of a host transfer halt and overhead time resulting from abackhitch in addition to the time of a host transfer.

If a determination is made only from comparison between the start timet#m of a backhitch and the start time t#m+1 of the subsequent backhitch,the determination may be based on a simple change in the transfer rateto the host side. When backhitching attributes are repeatedly measuredin a certain time period, the tape speed calculated from the timeinterval Ty between backhitches is selected in accordance with anexemplary embodiment.

After the tape speed calculated from the interval Ty between backhitchesis selected in accordance with an exemplary embodiment, the hosttransfer rate H may be increased temporarily due to the host restartingdata transfer after a host transfer halt. At such time, it may seem fromthe viewpoint of the host transfer rate H that the current tape speed islower than it should be, and thus a slightly higher drive transfer rateM should be selected. However, changes to the drive transfer rate M andtape speed in accordance with the various embodiments described hereinshould only be made if such changes will be beneficial for the longterm. If the drive transfer rate M is increased again on the basis ofthe host transfer rate H, a backhitch may occur again. Accordingly, evenafter the drive transfer rate M calculated from the backhitch intervalTy is selected, it is necessary to determine whether the current tapespeed is suited for the host transfer rate H for the long term.

If the current tape speed is suited for the host transfer rate H for thelong term, then the drive transfer rate M is not increased despite atemporary increase in the host transfer rate H.

Conversely, if the host transfer rate H is high over the long term andthere is a need to increase the tape speed, it is also necessary toincrease the drive transfer rate M. To this end, a determination whetherthe tape speed is suited for the host transfer rate H for the long termis made by monitoring the state inside the buffer. For example, if astate arises in which the host transfer rate H is higher than the drivetransfer rate M, and such state continues, the data read from the tapeis immediately transferred to the host from the buffer. Accordingly, theamount of data in the buffer that has not yet been transferred to thehost remains significantly small. In such case, the host transfer rateis determined to be high for the long term, and the tape speed isincreased. However, if a state arises in the buffer in which the amountof data that has not yet been transferred to the host is increased, andsuch state continues, the current drive transfer rate M is determined tobe appropriate for the host transfer rate H, and the tape speed is notincreased.

In accordance with an exemplary embodiment, a process for selecting thenext drive transfer rate M when the buffer becomes full now will bedescribed. First, as illustrated in FIG. 5, the drive transfer rate M isselected, and the actual backhitch start times t#m, t#m+1, t#m+2, . . .are measured via a known method. The actually measured backhitch timeinterval Ty is obtained by Ty=t#m+1−t#m, and the theoretical backhitchtime interval Tx is obtained by Tx=X/(M#m−H#m).

When the time interval Ty between two temporally continuous backhitchesis smaller than Tx (i.e., if Ty<Tx), the reading controller 16determines the tape speed on the basis of the backhitch interval Ty.That is, the reading controller 16 selects the tape speed such that thedrive transfer rate M matches the recalculated host transfer rate H*(=D/Ty) as closely as possible in accordance with an exemplaryembodiment. Conversely, if Ty≧Tx, the reading controller 16 selects thetape speed such that the drive transfer rate M matches the host transferrate H as closely as possible (i.e., M≈H) in accordance with a knowntechnique.

The above exemplary embodiments are for illustrative purposes only, andthe various embodiments described herein are not limited thereto. Forexample, the reading controller may measure a plurality of timeintervals Ty from continuous backhitch times and may derive continuousrecalculated host transfer rates H*#m, H*#m+1, H*#m+2, . . . , and thetape speed may be adjusted for a subsequent host transfer on the basisof the final recalculated host transfer rate H* being the mean value ofthe recalculated host transfer rates. Furthermore, a weight may beassigned to each of the plurality of recalculated host transfer ratesH*#m, H*#m+1, H*#m+2, . . . , the weighted values may be summed, and thesum may be utilized as the final recalculated host transfer rate H* toselect an improved tape speed.

In accordance with the various embodiments described herein, when thetape drive 10 intermittently receives a plurality of commands to read aplurality of data elements from a host, a value H* may be determined byrecalculating the host transfer rate H in consideration of time of ahost transfer halt subsequent to the host reading request. The tapespeed may be selected such that the drive transfer rate M is linked tothe value H*. When the drive transfer rate M is selected on the basis ofthe recalculated host transfer rate H*, the buffer is less likely tobecome full during subsequent host transfer halts. As a result,generally it will be unnecessary for the tape drive to performbackhitching in order to position the tape at the location of a dataelement to be subsequently read. Accordingly, the various embodimentshave the advantage of suppressing overhead during host transfer.

The above-described examples are provided with respect to read requests.However, the technique in accordance with the various embodiments alsomay be applied with respect to write requests. It should be noted that abackhitch occurs in the context of a read request when the bufferbecomes full, whereas a backhitch occurs in the context of a writerequest when the buffer becomes empty.

The invention claimed is:
 1. A tape drive for transferring data to ahost, the tape drive comprising: a buffer for temporarily storing datato be transferred to the host; a tape for recording the data to betemporarily stored in the buffer; a read head for reading the datarecorded on the tape and sequentially storing the data in the buffer;and a reading controller for initially setting a tape speed according toa first host transfer rate, driving the tape at the tape speed,measuring an amount of data stored in the buffer during a host transferhalt subsequent to a host transfer, determining whether the buffer isfull of data, and, upon determining that the buffer is full of data,adjusting the tape speed such that a drive transfer rate is lower thanthe first host transfer rate by calculating a second host transfer ratein consideration of the host transfer and the host transfer halt andsetting the tape speed according to the second host transfer rate,wherein the reading controller calculates the second host transfer rateon the basis of measured backhitching attributes resulting from the hosttransfer halt.
 2. The tape drive of claim 1, wherein the readingcontroller invokes backhitching when the buffer becomes full of data. 3.The tape drive according to claim 1, wherein the measured backhitchingattributes include a time interval between beginning points of a firstbackhitch and a second backhitch and an amount of data transferredduring the time interval.
 4. A tape drive recording system comprising: ahost; and a tape drive connected to the host, the tape drive comprising:a buffer for temporarily storing data to be transferred to the host; atape for recording the data to be temporarily stored in the buffer; aread head for reading the data recorded on the tape and sequentiallystoring the data in the buffer; and a reading controller for initiallysetting a tape speed according to a first host transfer rate, drivingthe tape at the tape speed, measuring an amount of data stored in thebuffer during a host transfer halt subsequent to a host transfer,determining whether the buffer is full of data, and, upon determiningthat the buffer is full of data, adjusting the tape speed such that adrive transfer rate is lower than the first host transfer rate bycalculating a second host transfer rate in consideration of the hosttransfer and the host transfer halt and setting the tape speed accordingto the second host transfer rate, wherein the reading controllercalculates the second host transfer rate on the basis of measuredbackhitching attributes resulting from the host transfer halt.
 5. Thetape drive recording system according to claim 4, wherein the readingcontroller of the tape drive invokes backhitching when the bufferbecomes full of data.
 6. The tape drive recording system according toclaim 4, wherein the measured backhitching attributes include a timeinterval between beginning points of a first backhitch and a secondbackhitch and an amount of data transferred during the time interval. 7.A method for selecting a tape speed for transferring data from a tapedrive to a host, the method comprising: setting the tape speed initiallyaccording to a first host transfer rate; driving a tape at the tapespeed; measuring an amount of data stored in a buffer of the tape driveduring a host transfer halt subsequent to a host transfer; determiningwhether the buffer is full of data; and upon determining that the bufferis full of data, adjusting the tape speed such that a drive transferrate is lower than the first host transfer rate by calculating a secondhost transfer rate in consideration of the host transfer and the hosttransfer halt and setting the tape speed according to the second hosttransfer rate, wherein the calculating step comprises measuringbackhitching attributes resulting from the host transfer halt.
 8. Themethod according to claim 7, further comprising invoking backhitchingwhen the buffer becomes full of data.
 9. The method according to claim7, wherein the measured backhitching attributes include a time intervalbetween beginning points of a first backhitch and a second backhitch andan amount of data transferred during the time interval.